home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2007 December / PCWKCD1207B.iso / Fiszkowe programy do nauki / jMemorize 1.2.3 / jMemorize-1.2.3-setup.exe / jMemorize-1.2.3.exe / ant / compile.xml next >
Extensible Markup Language  |  2006-09-26  |  7KB  |  135 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  4. <!-- iText, a JAVA - PDF library                                      -->
  5. <!-- $Id: compile.xml,v 1.13 2006/09/25 21:08:07 xlv Exp $         -->
  6. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  7.  
  8. <project name="iText.compile" default="help">
  9.     
  10.     <property file=".ant.properties" />
  11.     
  12.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  13.     <!-- Help                                                             -->
  14.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  15.  
  16.     <target name="help" description="--> shows the help screen">
  17.         <echo>COMPILING AND JARRING THE CODE (compile.xml)</echo>
  18.         <echo>ant compile: compiles iText</echo>
  19.         <echo>ant compile.debug: compiles iText and allows you to debug the code</echo>
  20.         <echo>ant jar: compiles and jars iText</echo>
  21.         <echo>ant jar.debug: compiles for debugging and jars iText</echo>
  22.         <echo />
  23.     </target>
  24.  
  25.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  26.     <!-- Compiling the code                                               -->
  27.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  28.  
  29.     <target name="compile" description="--> compiles the iText code">
  30.         <mkdir dir="${itext.classes}" />
  31.         <javac source="1.4" target="1.4" srcdir="${itext.src}" destdir="${itext.classes}" />
  32.     </target>
  33.  
  34.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  35.     <!-- Compiling the code for debugging                                 -->
  36.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  37.  
  38.     <target name="compile.debug" description="--> compiles the iText code for debugging">
  39.         <mkdir dir="${itext.classes}" />
  40.         <javac source="1.4" target="1.4" srcdir="${itext.src}" destdir="${itext.classes}" listfiles="yes" debug="true" debuglevel="lines,vars,source" />
  41.     </target>
  42.  
  43.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  44.     <!-- Jarring the code                                                 -->
  45.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  46.  
  47.     <target name="make.jar" description="--> makes a jarfile from the iText code">
  48.         <mkdir dir="${itext.bin}" />
  49.         <mkdir dir="${itext.classes}/com/lowagie/text/pdf/fonts" />
  50.         <copy todir="${itext.classes}/com/lowagie/text/pdf/fonts" overwrite="yes">
  51.             <fileset dir="${itext.src}/com/lowagie/text/pdf/fonts">
  52.                 <include name="**/*.afm"/>
  53.                 <include name="**/*.html"/>
  54.             </fileset>
  55.         </copy>
  56.         <copy todir="${itext.classes}/com/lowagie/text/" overwrite="yes">
  57.             <fileset dir="${itext.src}/com/lowagie/text/">
  58.                 <include name="**/*.txt"/>
  59.             </fileset>
  60.         </copy>
  61.         <copy todir="${itext.classes}/com/lowagie/tools/plugins" overwrite="yes">
  62.             <fileset dir="${itext.src}/com/lowagie/tools/plugins/">
  63.                 <include name="**/*.txt"/>
  64.             </fileset>
  65.         </copy>
  66.         <copy todir="${itext.classes}/com/lowagie/tools/plugins/treeview" overwrite="yes">
  67.             <fileset dir="${itext.src}/com/lowagie/tools/plugins/treeview/">
  68.                 <include name="**/*.gif"/>
  69.             </fileset>
  70.         </copy>
  71.         <copy todir="${itext.classes}/com/lowagie/text/pdf/codec/postscript" overwrite="yes">
  72.             <fileset dir="${itext.src}/com/lowagie/text/pdf/codec/postscript/">
  73.                 <include name="**/*.ps"/>
  74.             </fileset>
  75.         </copy>
  76.         <jar jarfile="${itext.bin}/iText.jar" basedir="${itext.classes}" manifest="../META-INF/MANIFEST.MF" excludes="com/lowagie/examples/**,**/*.cmap,**/*.properties,com/lowagie/text/pdf/fonts/cmaps/**" />
  77.     </target>
  78.  
  79.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  80.     <!-- Compiling and Jarring the code                                   -->
  81.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  82.     
  83.     <target name="jar"  depends="compile, make.jar" description="--> makes a jarfile from the iText code" />
  84.  
  85.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  86.     <!-- Jarring the code (debug)                                         -->
  87.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  88.     
  89.     <target name="jar.debug"  depends="compile.debug, make.jar" description="--> makes a jarfile from the iText code" />
  90.  
  91.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  92.     <!-- Updating the JavaCC generated files for the postscript grammar   -->
  93.     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  94.     <target name="update-parser" description="updates the JavaCC generated files for the postscript grammar" >
  95.         <fail message="JavaCC location is not defined properly">
  96.             <condition>
  97.                 <not>
  98.                     <available file="${javacc.home}" type="dir" />
  99.                 </not>
  100.             </condition>
  101.         </fail>
  102.  
  103.         <property name="parser_input.dir" value="${itext.src}/com/lowagie/text/pdf/codec/postscript" />
  104.         <property name="parser_output.dir" value="${itext.build}/parser" />
  105.  
  106.         <mkdir dir="${parser_output.dir}" />
  107.         <javacc
  108.             target="${parser_input.dir}/paparser.jj"
  109.             outputdirectory="${parser_output.dir}"
  110.             javacchome="${javacc.home}"
  111.             static="false" />
  112.  
  113.         <macrodef name="insertlicense">
  114.             <attribute name="name"/>
  115.             <sequential>
  116.                 <concat destfile="${parser_input.dir}/@{name}">
  117.                     <filelist dir="${parser_input.dir}" files="license.txt"/>
  118.                     <filelist dir="${parser_output.dir}" files="@{name}"/>
  119.                 </concat>
  120.             </sequential>
  121.         </macrodef>
  122.  
  123.         <insertlicense name="JavaCharStream.java" />
  124.         <insertlicense name="PAParser.java" />
  125.         <insertlicense name="PAParserConstants.java" />
  126.         <insertlicense name="PAParserTokenManager.java" />
  127.         <insertlicense name="ParseException.java" />
  128.         <insertlicense name="Token.java" />
  129.         <insertlicense name="TokenMgrError.java" />
  130.  
  131.         <delete dir="${parser_output.dir}" />
  132.     </target>
  133.  
  134. </project>
  135.